<template>
	<div></div>
</template>

<script>
	export default {
		name: "company_flow_order",
		data: function() {
			return {};
		},
		created: function() {
			var that = this;
			var tradeNo = this.$route.params.tradeNo;
			this.common.post(this.api.flow_order, {
				tradeNo: tradeNo,
			}, function(data) {
				var res=data.resultMap;
				var status = parseInt(res.tradeStatus);
				var redirect = String.Format("/cont_education/apply/confirm_order/{0}/{1}", res.kid, tradeNo);
				if (status == 3) {
					redirect = "/cont_education/apply/refund_success/" + tradeNo;
				} else if (status == 2) {
					redirect = "/cont_education/apply/apply_success/" + tradeNo;
				} else if (status == 0) {
					that.common.toPage("/cont_education/apply/zhifubao/" + tradeNo);
					return;
				}
				that.common.toPage(redirect);
			});
		}

	}
</script>

<style>
</style>
